import request from '../request.js'

// 获取所以城市列表
export function getAllCity(data) {
  return request.request({
      url: `/api/index/get_city_list`,
      data: data,
      method: 'POST'
  })
}

//获取首页数据接口
export function getHomeData(data) {
  return request.request({
      url: `/api/index/index`,
      data: data,
      method: 'POST'
  })
}


//用户登录
export function userLogin(data) {
  return request.request({
      url: `/api/UserHand/authorization_register`,
      data: data,
      method: 'POST'
  })
}

//帮我找房
export function helpFind(data) {
  return request.request({
      url: `/api/index/add_help_me`,
      data: data,
      method: 'POST'
  })
}
//获取资讯的类型 
export function getMsgType() {
  return request.request({
      url: `/api/RealTimeInfo/get_type`,
      method: 'POST'
  })
}

//获取资讯的列表 
export function getMsgList(data) {
  return request.request({
      url: `/api/RealTimeInfo/get_real_time_list`,
      data: data,
      method: 'POST'
  })
}
//获取资讯的详情 
export function getMsgDetail(data) {
  return request.request({
      url: `/api/RealTimeInfo/get_real_time_info`,
      data: data,
      method: 'POST'
  })
}

//我要租房和卖房
export function sendOrSallHouse(data) {
  return request.request({
      url: `/api/ReleaseHousing/add_selling_houses`,
      data: data,
      method: 'POST'
  })
}

//买卖宝典类型icons
export function buyTypes() {
  return request.request({
      url: `/api/TreasureBook/get_treasure_book_type`,
      method: 'POST'
  })
}
//买卖宝典数据
export function buyList(data) {
  return request.request({
      url: `/api/TreasureBook/get_treasure_book_recommend`,
      method: 'POST',
      data: data
  })
}
//买卖宝典数据(分类)
export function buyTypeList(data) {
  return request.request({
      url: `/api/TreasureBook/get_treasure_book_list`,
      method: 'POST',
      data: data
  })
}
//买卖宝典详情
export function articleDetail(data) {
  return request.request({
      url: `/api/TreasureBook/get_treasure_book_info`,
      method: 'POST',
      data: data
  })
}
//系统消息列表
export function sysList(data) {
  return request.request({
      url: `/api/SystemMessage/get_message_list`,
      method: 'POST',
      data: data
  })
}

//系统消息详情
export function sysListDetail(data) {
  return request.request({
      url: `/api/SystemMessage/get_message_info`,
      method: 'POST',
      data: data
  })
}

//获取关注列表
export function followList(data) {
  return request.request({
      url: `/api/PersonalCenter/get_follow_list`,
      method: 'POST',
      data: data
  })
}

//获取权证办理（富文本相关）
export function configuration(data) {
  return request.request({
      url: `/api/PersonalCenter/get_configuration`,
      method: 'POST',
      data: data
  })
}

//获取待接收的邀约
export function invitationList(data) {
  return request.request({
      url: `/api/PersonalCenter/get_invitation_list`,
      method: 'POST',
      data: data
  })
}

//获取对方用户头像和昵称
export function userHeader(data) {
  return request.request({
      url: `/api/index/get_user_open_info`,
      method: 'POST',
      data: data
  })
}


//获取用户端二手房列表
export function secondHouseList(data) {
  return request.request({
      url: `/api/UserHouse/get_second_list`,
      method: 'POST',
      data: data
  })
}

//获取用户端二手房详情
export function secondHouseDetail(data) {
  return request.request({
      url: `/api/UserHouse/get_second_info`,
      method: 'POST',
      data: data
  })
}

//获取区域等信息
export function cityInfo(data) {
  return request.request({
      url: `/api/UserHouse/get_city_info`,
      method: 'POST',
      data: data
  })
}

//接收拒绝看房
export function passOrRefuse(data) {
  return request.request({
      url: `/api/PersonalCenter/accept_invitation`,
      method: 'POST',
      data: data
  })
}

//code换取sessionKey
export function getSessionKey(data) {
  return request.request({
      url: `/api/UserHand/get_session_key`,
      method: 'POST',
      data: data
  })
}

//收藏
export function careHouse(data) {
  return request.request({
      url: `/api/PersonalCenter/add_follow`,
      method: 'POST',
      data: data
  })
}

//确认看房
export function confirmHouse(data) {
  return request.request({
      url: `/api/UserHouse/confirm_house_inspection`,
      method: 'POST',
      data: data
  })
}

//反馈类型
export function sendErrmsg() {
  return request.request({
      url: `/api/PersonalCenter/feedback_type`,
      method: 'POST'
  })
}
//提交反馈
export function sendErrmsgData(data) {
  return request.request({
      url: `/api/PersonalCenter/add_feedback`,
      method: 'POST',
      data: data
  })
}

//获取城市详情
export function cityDetail(data) {
  return request.request({
      url: `/api/index/get_city_info`,
      method: 'POST',
      data: data
  })
}

//获取塞选数据类型
export function selectData(data) {
  return request.request({
      url: `/api/SearchCriteria/lists`,
      method: 'POST',
      data: data
  })
}